package com.atguigu.gulimall.auth.feign;

import com.atguigu.gulimall.auth.vo.SocialUser;
import com.atguigu.gulimall.auth.vo.UserLoginVo;
import com.atguigu.gulimall.auth.vo.UserRegisterVo;
import com.gulimall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient("gulimall-member")
public interface MemberFeignService {
    @RequestMapping("member/member/register") // member
     R register(@RequestBody UserRegisterVo registerVo);

    @PostMapping("member/member/login")
     R login(@RequestBody UserLoginVo vo);

    @PostMapping("member/member/socialLogin")
    R socialLogin(@RequestBody SocialUser user) throws Exception;
}
